﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<iBuproModel.DiplomProject>>" %>
<%@ Import Namespace="IBupro.Extensions" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	<%: Html.Translate("diplomProject") %>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2><%: Html.Translate("diplomProject") %></h2>

    <table>
    <thead>
        <tr>
            <th></th>
            <th>
                <%: Html.Translate("name") %>
            </th>
            <th>
                <%: Html.Translate("details") %>
            </th>
            <th>
                <%: Html.Translate("creationDate") %>
            </th>
            <th>
                <%: Html.Translate("shortcut") %>
            </th>
            <th>
                <%: Html.Translate("lector") %>
            </th>
            <th>
                <%: Html.Translate("subject") %>
            </th>
            <th>
                <%: Html.Translate("subscribe") %>
            </th>
            <th>
                <%: Html.Translate("diplomProjectType") %>
            </th>
        </tr>
    </thead>

    <tbody>
    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
                <%: Html.ActionLink(Html.Translate("details"),"Details","DiplomProject", new { id=item.Id },null)%>
            </td>
            <td>
                <%: item.Name %>
            </td>
            <td>
                <%: Html.TruncateDetail(item.Detail) %>
            </td>
            <td>
                <%: String.Format("{0:g}", item.Created) %>
            </td>
            <td>
                <%: item.Shortcut %>
            </td>
            <td>
                <%:Html.ActionLink(item.Lector.FirstName + " " + item.Lector.LastName, "Detail", "Lector", new { id = item.Lector.Id },null)%>
            </td>
            <td>
                (<%:item.Subject.Shortcut %>)<%:item.Subject.Name %>
            </td>
            <td>
                <%: Html.ActionLink(Html.Translate("subscribe"), "Subscribe","DiplomProject", new {id = item.Id }, null)%>
            </td>
            <td>
                <%:item.DiplomProjectType.Name %>
            </td>

        </tr>
    
    <% } %>
    </tbody>
    </table>

</asp:Content>

